<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>提出问题</title>
    <link rel="stylesheet" href="/css/bootstrap.css" />
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css" />
    <script src="/js/JQuery.js"></script>
    <script src="/js/askquestion.js"></script>
    <script type="application/javascript" src="/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/index.css">
    <link rel="stylesheet" href="/css/askquestion.css">
</head>
<body>
<!--导入navigation.html中的nav-->
<div th:insert="~{navigation :: nav}"></div>
<!--问题 主要内容模块-->
<div class="container-fluid main">
  <div class="row">
  <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12" style="border-right: 1px solid #eee;">
    <h2><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>提出问题</h2>
    <hr>
    <form action="http://localhost:8081/askquestion" method="post">
      <!--问题id-->
      <input type="hidden" name="id" th:value="${id}">
      <div class="form-group">
        <label for="title">问题标题（简单扼要）:</label>
        <input th:value="${title}" type="text"  class="form-control" name="title" id="title" placeholder="问题标题">
      </div>
      <div class="form-group">
        <label for="description">问题补充（必填，请参照右侧提示）:</label>
        <textarea th:text="${description}" name="description"  class="form-control" cols="30" rows="10" id="description" ></textarea>
      </div>
      <div class="form-group">
        <label for="tag">添加标签:</label>
        <input th:value="${tag}" type="text" name="tag" class="form-control" id="tag" placeholder="请输入标签，以逗号分隔(,)" onfocus="" autocomplete="off" ></input>
        <!--选择标签模块-->
        <div id="select-tag">
          <span class="label label-primary">选择标签：</span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-study" onclick="selectTag(document.getElementById('tag-study').innerHTML)">学习相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-job" onclick="selectTag(document.getElementById('tag-job').innerHTML)">工作相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-life" onclick="selectTag(document.getElementById('tag-life').innerHTML)">生活相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-exam" onclick="selectTag(document.getElementById('tag-exam').innerHTML)">考试相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-shopping" onclick="selectTag(document.getElementById('tag-shopping').innerHTML)">购物相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-expressage" onclick="selectTag(document.getElementById('tag-expressage').innerHTML)">快递相关问题</span>
          </span>
          <span class="label label-info">
            <span class="glyphicon glyphicon-tags" id="tag-other" onclick="selectTag(document.getElementById('tag-other').innerHTML)">其他问题</span>
          </span>
        </div>
      </div>
      <!--显示用户未登录错误信息-->
      <div class="container-fluid main">
        <div class="row">
          <div th:if="${error != null}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 alert alert-danger" role="alert" th:text="${error}">
          </div>
          <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <button type="submit" class="btn btn-success btn-submit">提交发布</button>
          </div>

        </div>
      </div>
    </form>
  </div>
  <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 30px">
    <h3>问题提出指南：</h3>
    1.问题标题：请用精简的语言描述您的问题，建议不超过25个字<br>
    2.问题补充：详细补充您的问题内容，并确保问题描述清晰直观<br>
    3.选择标签：选择一个或多个标签，用逗号隔开(,)，每个标签不超过10个字<br>
  </div>
  </div>
</div>

</body>
</html>